Question : `defineProps` is a compiler macro and no longer needs to be imported.
Answered by : muhammad-khizar-hayat
problem :
solve :
Get rid of defineProps, defineEmits Import , Use it directly , See the website :defineprops- and -defineemits Use
// Remove active import
import { defineProps, defineEmits } from 'vue';
result :
<script setup>
// Remove active import , Use it directly defineProps
const props = defineProps({
foo: String
})
const emit = defineEmits(['change', 'delete'])
</script>
Source : https://qdmana.com/2022/115/202205020234252974.html | Last Update : Sun, 14 Aug 22